import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { Test01Component } from './test/test01/test01.component';
import {HttpModule} from '@angular/http';
import { UserManagerComponent } from './user/user-manager/user-manager.component';
import { HeaderComponent } from './frame/header/header.component';
import { LeftSideBarComponent } from './frame/left-side-bar/left-side-bar.component';
import { ContentComponent } from './frame/content/content.component';
import { FooterComponent } from './frame/footer/footer.component';
import { RightSideBarComponent } from './frame/right-side-bar/right-side-bar.component';
import {RouterModule, Routes} from '@angular/router';
import { StudentManagerComponent } from './student/student-manager/student-manager.component';
import {StudentService} from './student/share/student.service';
import { StudentFormComponent } from './student/student-form/student-form.component';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { FilterPipe } from './student/pipe/filter.pipe';

const routerConfig: Routes = [
  {path: 'studentManager', component: StudentManagerComponent },
  {path: 'test01', component: Test01Component},
  {path: 'studentForm/:studentId', component: StudentFormComponent}
];

@NgModule({
  declarations: [
    AppComponent,
    Test01Component,
    UserManagerComponent,
    HeaderComponent,
    LeftSideBarComponent,
    ContentComponent,
    FooterComponent,
    RightSideBarComponent,
    StudentManagerComponent,
    StudentFormComponent,
    FilterPipe
  ],
  imports: [
    BrowserModule,
    HttpModule,
    RouterModule.forRoot(routerConfig),
    FormsModule,
    ReactiveFormsModule
  ],
  providers: [StudentService],
  bootstrap: [AppComponent]
})
export class AppModule { }
